import QtQuick 2.15
import QtQuick.Controls 2.15
import SutoDisplay 1.0
import QtGraphicalEffects 1.15

Item {
    width: 100
    height: 400

    Rectangle {
        y : 0
        id: rectangle1
        width: parent.width
        height: parent.height
        Rectangle {
            id:grid1
            x:0
            y:0
            width: parent.width
            height: parent.height
            visible: false
            color: "red"

            Rectangle {
                id: rectangle2
                width: parent.width
                height: parent.height/3
                color: "blue"
            }

            Rectangle {
                id: rectangle3
                width: parent.width
                height: parent.height/2
                color: "blue"
                anchors.bottom: parent.bottom
            }
        }

        Rectangle{
            id:maskrect1
            x:0
            y:0
            width: parent.width
            height: parent.height
            radius: parent.width/2
            border.color: "red"
        }

        OpacityMask{
            x: 20
            y: 50
            source: grid1
            maskSource: maskrect1
            anchors.fill: maskSource
        }
    }



}
